package cn.wsh.org.domain;

import cn.wsh.basic.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.*;

import java.util.ArrayList;
import java.util.List;

@Data // 编译的时候帮你生成   不用写getter setter 等等
public class Department extends BaseDomain {
    //快速格式化 ctrl +alt +l

    //部门编号
    private String sn;
    private String name;
    //部门上级层级目录
    private String dirPath;
    private Integer state;

    private Long manager_id;//部门管理员
    private Employee manager;
    private Long parent_id;

    private Department parent;

    //当前部门对应的儿子   能做到无限极
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    List<Department> children = new ArrayList<>();


}
